<?php
class Problem extends AppModel{
	var $name = 'Problem';
	var $cacheQueries =true;
	var $hasMany=array("Scoreboard");
	/*
	 *
	 * activate ($id) - Activate problem.
	 *
	 * param:
	 *
	 * $id : problem id
	 *
	 * return:
	 *
	 * true if success, false if fail.
	 *
	 */
	function open($id){
		$this->id=$id;
		$this->set('open', 1);
		return $this->save();
	}
}
?>